exports.initPopover = function(ctx, selector = '') {
    let dom = ctx.selectComponent(selector);
    ctx.createSelectorQuery()
        .select(selector)
        .boundingClientRect((res) => {
            // console.log(res);
            if (dom) {
                let popovertarget = dom.data.popovertarget;
                let popDom = ctx.selectComponent('#' + popovertarget);
                if (popDom) {
                    popDom.setPos(res)
                    popDom.open()
                }
       
                // console.log(popDom);
            }

        }).exec()
}